package com.well.rpc.config;


import com.well.rpc.event.DoWellJobEvent;
import com.well.rpc.event.ExceptionEvent;
import com.well.rpc.event.RegisterResponseEvent;
import com.well.rpc.handler.ClientPostProcessor;
import com.well.rpc.listener.ClientListener;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

@Order(1)
@Configuration
@EnableConfigurationProperties({ClientListener.class})
public class RegisterAutoConfig {

    @Bean
    public RegisterResponseEvent registerResponseEvent() {
        return new RegisterResponseEvent();
    }

    @Bean
    public DoWellJobEvent doWellJobEvent() {
        return new DoWellJobEvent();
    }

    @Bean
    public ExceptionEvent ExceptionEvent() {
        return new ExceptionEvent();
    }

    @Bean
    public ClientPostProcessor clientPostProcessor() {
        return new ClientPostProcessor();
    }
}
